<?php
date_default_timezone_set( "Asia/Shanghai" );
$time = date( "Y" );
print $time;
if ($time >= 5 && $time < 10) {
    echo '早上好';
} elseif ($time >= 10 && $time < 13) {
    echo '中午好';
} elseif ($time >= 13 && $time < 18) {
    echo '下午好';
} elseif ($time >= 18 && $time < 22) {
    echo '晚上好';
} else {
    echo '睡觉时间';
}